package com.bawan.wsc.weather.example;


import junit.framework.TestCase;

public class WeatherWebServiceTestCase extends TestCase {
    public WeatherWebServiceTestCase(String name) {
        super(name);
    }

    public void testWeatherWebServiceSoapWSDL() throws Exception {
        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
        java.net.URL url = new java.net.URL(new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoapAddress() + "?WSDL");
        javax.xml.rpc.Service service = serviceFactory.createService(url, new com.bawan.wsc.weather.WeatherWebServiceLocator().getServiceName());
        assertTrue(service != null);
    }

    public void test1WeatherWebServiceSoapGetSupportCity() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getSupportCity(new String());
        // TBD - validate results
    }

    public void test2WeatherWebServiceSoapGetSupportProvince() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getSupportProvince();
        // TBD - validate results
    }

    public void test3WeatherWebServiceSoapGetSupportDataSet() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        com.bawan.wsc.weather.GetSupportDataSetResponseGetSupportDataSetResult value = null;
        value = binding.getSupportDataSet();
        // TBD - validate results
    }

    public void test4WeatherWebServiceSoapGetWeatherbyCityName() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getWeatherbyCityName(new String());
        // TBD - validate results
    }

    public void test5WeatherWebServiceSoapGetWeatherbyCityNamePro() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap_BindingStub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getWeatherbyCityNamePro(new String(), new String());
        // TBD - validate results
    }

    public void testWeatherWebServiceSoap12WSDL() throws Exception {
        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
        java.net.URL url = new java.net.URL(new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12Address() + "?WSDL");
        javax.xml.rpc.Service service = serviceFactory.createService(url, new com.bawan.wsc.weather.WeatherWebServiceLocator().getServiceName());
        assertTrue(service != null);
    }

    public void test6WeatherWebServiceSoap12GetSupportCity() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap12Stub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap12Stub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getSupportCity(new String());
        // TBD - validate results
    }

    public void test7WeatherWebServiceSoap12GetSupportProvince() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap12Stub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap12Stub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getSupportProvince();
        // TBD - validate results
    }

    public void test8WeatherWebServiceSoap12GetSupportDataSet() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap12Stub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap12Stub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        com.bawan.wsc.weather.GetSupportDataSetResponseGetSupportDataSetResult value = null;
        value = binding.getSupportDataSet();
        // TBD - validate results
    }

    public void test9WeatherWebServiceSoap12GetWeatherbyCityName() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap12Stub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap12Stub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getWeatherbyCityName("北京");
        for(String str : value) {
            System.out.println(str);
        }
        // TBD - validate results
    }

    public void test10WeatherWebServiceSoap12GetWeatherbyCityNamePro() throws Exception {
        com.bawan.wsc.weather.WeatherWebServiceSoap12Stub binding;
        try {
            binding = (com.bawan.wsc.weather.WeatherWebServiceSoap12Stub)
                          new com.bawan.wsc.weather.WeatherWebServiceLocator().getWeatherWebServiceSoap12();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        String[] value = null;
        value = binding.getWeatherbyCityNamePro(new String(), new String());
        // TBD - validate results
    }

}
